import { createRouter, createWebHistory } from "vue-router";
import Home from "../pages/home/index.vue";

const router = createRouter({
  history: createWebHistory(),
  routes: [
	{
		path: '/',
		name: '/',
		component: () => import('/@/layout/index.vue'),
		redirect: '/postList',
		children: [
			{
				path: "/postList",
				component: () => import('/@/pages/postList/index.vue'),
			},
			{
				path: "/post/:id",
				component: () => import('/@/pages/post/index.vue'),
			},
			{
				path: "/post/new",
				component: () => import('/@/pages/post/new.vue'),
			},
		],
	}
  ],
});

export default router;
